package com.twohand.admin.Service;

import com.github.binarywang.wxpay.exception.WxPayException;
import com.twohand.admin.Dto.WxOrderListQueryDto;
import com.twohand.admin.Dto.WxPreOrderDto;
import com.twohand.admin.Dto.pay.RefundDto;
import com.twohand.admin.Entity.WxOrder;
import com.twohand.admin.Util.PageResponse;
import com.twohand.admin.Vo.WxPayOrderNotifyCallbackResultVo;
import com.twohand.admin.Vo.pay.PayOrderListVo;

import java.math.BigDecimal;

public interface WxOrderService {
    WxOrder preCreateOrder(WxPreOrderDto wxPreOrderDto) throws WxPayException;
    WxPayOrderNotifyCallbackResultVo payNotify(String xmlData, String nonce, String timestamp, String serial, String signature);
    Object test(String orderNo);

    public PageResponse<PayOrderListVo> getAllWxOrderList(WxOrderListQueryDto wx_orderListQueryDto);
    public WxOrder getWxOrderById(Integer id);
    public Boolean insertWxOrder(WxOrder wx_order);
    public Boolean updateWxOrder(WxOrder wx_order);
    public Boolean deleteWxOrderById(Integer id);

    Boolean refund(RefundDto refundDto) throws WxPayException;

    WxPayOrderNotifyCallbackResultVo refundNotity(String notifyData,String nonce,String timestamp, String serial,String signature);

    BigDecimal getCanRefundCount(String no);
}
